<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

<script>
// screen对象，包含有关用户显示屏幕的信息
console.log( screen );

console.log( screen.width );// 1366 用户显示屏幕的宽度
console.log( screen.height );// 768 用户显示屏幕的高度
console.log( screen.availWidth );// 1366 用户显示屏幕的宽度(不含任务栏)
console.log( screen.availHeight );// 720 用户显示屏幕的高度(不含任务栏)

</script>
</body>
</html>